package com.xxx.corejava.day1106;

import java.util.Arrays;

public class Test3 {


    public static void main(String[] args) {

        int[] a;

        int[][] arr=new int[2][3];

        System.out.println(arr.length);
        System.out.println(arr[0].length);


        for (int i = 0; i < arr.length; i++) {
            for (int j = 0; j < arr[i].length; j++) {
                System.out.print(arr[i][j]+"\t");
            }
            System.out.println();
        }


        System.out.println("arr[0] = " + arr[0]);
        System.out.println("arr[1] = " + arr[1]);


        int[][] arr2=new int[2][];

        System.out.println("Arrays.toString(arr2) = " + Arrays.toString(arr2));

        arr2[0]=new int[]{1,2};
        arr2[1]=new int[]{3};


        for (int i = 0; i < arr2.length; i++) {
            for (int j = 0; j < arr2[i].length; j++) {
                System.out.print(arr2[i][j]+"\t");
            }
            System.out.println();
        }


        int[][] arr3={
                {1,2,3,4},
                {5,6,7,8}
        };
    }

}
